package crp.core.portal.app;

import crp.core.portal.domain.services.PortalBannerEditor;
import crp.core.portal.domain.services.PortalBannerSearcher;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Instance;
import javax.inject.Inject;

@ApplicationScoped
public class PortalBannerService {
    private final Instance<PortalBannerSearcher> searcher;
    private final Instance<PortalBannerEditor> editor;

    @Inject
    public PortalBannerService(Instance<PortalBannerSearcher> searcher,
                               Instance<PortalBannerEditor> editor) {
        this.searcher = searcher;
        this.editor = editor;
    }

    public PortalBannerSearcher searcher() {
        return searcher.get();
    }

    public PortalBannerEditor editor() {
        return editor.get();
    }

}
